package org.ielse.frame;

import java.util.List;

import android.view.View;
import android.view.ViewGroup;

public abstract class BaseAdapter extends android.widget.BaseAdapter {

	private List<?> dataList;

	public BaseAdapter(List<?> dataList) {
		if (dataList == null) throw new IllegalArgumentException("no data, you play the ball ?");
		this.dataList = dataList;
	}

	@Override public int getCount() {
		return dataList.size();
	}

	@Override public Object getItem(int position) {
		return dataList.get(position);
	}

	@Override public long getItemId(int position) {
		return position;
	}

	@Override public abstract View getView(int position, View convertView, ViewGroup parent);

}
